/* 动态背景 */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="40" stroke="rgba(255,255,255,0.1)" stroke-width="2" fill="none"/></svg>') repeat;
    opacity: 0.3;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100px 100px;
    }
}

/* 登录容器样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(0);
    transition: all 0.3s ease;
}

.login-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.login-box h2 {
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
}

/* 表单标签切换 */
.form-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn.active {
    color: #fff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 表单样式 */
.form {
    display: none;
}

.form.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    transition: all 0.3s ease;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 45px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group select:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

.form-group input:focus + i {
    color: #fff;
}

.form-group select {
    width: 100%;
    padding: 14px 45px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.form-group select:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

.form-group select option {
    background: rgba(102, 126, 234, 0.95);
    color: #fff;
    padding: 10px;
}

.form-group select:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* 添加下拉箭头 */
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group select:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.remember-me label {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 14px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #fff;
}

/* 按钮样式 */
.login-btn,
.register-btn {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.login-btn::before,
.register-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.5s ease;
}

.login-btn:hover::before,
.register-btn:hover::before {
    left: 100%;
}

.login-btn:hover,
.register-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 表单底部链接 */
.form-footer {
    text-align: center;
    margin-top: 24px;
}

.forgot-password {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-password::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #fff;
    transition: width 0.3s ease;
}

.forgot-password:hover {
    color: #fff;
}

.forgot-password:hover::after {
    width: 100%;
}

/* 错误消息样式 */
.error-message {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    padding-left: 45px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px 40px;
    }
    
    .login-box h2 {
        font-size: 28px;
    }
}